package ar.com.photo_admin.service.marshallers

import grails.converters.JSON

import ar.com.photo_admin.domain.*;
import ar.com.photo_admin.service.dto.*;

class PhotoMarshaller {

	void register() {
	
		JSON.registerObjectMarshaller(PhotoDTO) { PhotoDTO photo ->
			
			return [
				url: photo.url,
				thumbnailUrl : photo.thumbnailUrl,
				id: photo.id
			]	
		}	
	}
}
